﻿using System.Linq;
using ZBJF.Warranty.Model;
using ZBJF.Warranty.Model.ViewModel.BaseQueryModel;

namespace ZBJF.Warranty.IBLL
{
    public partial interface ISystemRoleService
    {
        SystemRole LoadByID(int id);
        IQueryable<SystemRole> LoadAll(bool showDisabled = true);

        bool IsExistRoleName(string roleName, int id = 0);
        bool IsExistRoleCode(string roleCode, int id = 0);
        /// <summary>
        /// 禁用或启用
        /// </summary>
        /// <param name="id">ID</param>
        /// <param name="isAvailable">状态字段</param>
        /// <returns></returns>
        bool Disabled(int id, bool isAvailable = false);
        IQueryable<SystemRole> GetPagingList(BaseQueryParams model, out int total);
    }
}